<?php
/**
 * 查询构建器 find() select()
 * ORM get() all()
 */

namespace app\api\model;


class UserAddress extends BaseModel
{
    public static function getOne($user_id, $id)
    {
        return self::where(['user_id'=>$user_id, 'id'=>$id])->find();
    }

    public static function updateOne($user_id, $id, $address)
    {
        return self::where(['user_id' => $user_id, 'id' => $id])->update($address);
    }
}